﻿using GDPView.Services;
using Microsoft.AspNetCore.Mvc;

namespace GDPView.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class GDPDataController : ControllerBase
    {
        private readonly IGDPDataRepository _gDPDataRepository;
        public GDPDataController(IGDPDataRepository gDPDataRepository)
        {
            _gDPDataRepository = gDPDataRepository;
        }
        [HttpGet]
        public async Task<IActionResult> GetSampleDatas()
        {
            var gDPDatasFromRepository = await _gDPDataRepository.GetGDPDatasAsync();
            return Ok(gDPDatasFromRepository);
        }
    }
}
